home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / GadUtil / Install < prev    next >
Text File  |  1997-10-05  |  28KB  |  1,167 lines

  1. ;--------------------------- Current version.revision ----------------------
  2. (set vernum (getversion "libs:gadutil.library"))
  3.  
  4. (set thisvernum (getversion "libs/gadutil.library"))
  5. (set thisver (/ thisvernum 65536))
  6. (set thisrev (- thisvernum (* thisver 65536)))
  7.  
  8. ;-------------------------------- Debugging... -----------------------------
  9. ;(set thisver 36)
  10. ;(set thisrev 54)
  11. ;(set thisvernum (+ thisrev (* thisver 65536)))
  12. ;(set @default-dest "ram:")
  13.  
  14. ;---------------------- All strings in the script --------------------------
  15.  
  16. (set #install-msg        "Installing GadUtil.library...")
  17.  
  18. (set #info-msg     (cat    "\n\nGadUtil installation script.\n"
  19.                         ("This script installs GadUtil %ld.%ld on your system.\n\n" thisver thisrev)
  20.                         "Read the docs for more information on the "
  21.                         "distribution and for use in commercial or "
  22.                         "other non-free programs.\n\n"
  23.                         "GadUtil is Copyright © 1994-1996 by\n"
  24.                         "P-O Yliniemi and Staffan Hämälä.\n"
  25.                         "All rights reserved."))
  26.  
  27. (set #usertype-msg (cat "\n\nTo make it as easy as possible to install this "
  28.                         "product on your computer, you have now the chance "
  29.                         "to select what 'kind' of user you class yourself as. "
  30.                         "When you have done this selection, the installation "
  31.                         "process will go much smoother, since you may not have "
  32.                         "to change too much of the presets.\n\n"
  33.                         "Don't overuse this function, since you'll wear out "
  34.                         "your mouse buttons if you select that you are a pro, "
  35.                         "if you actually are a lamer!!!"))
  36.  
  37. (set #selusertype-msg    "Select the user type closest to yourself")
  38. (set #usertype1-msg        "Minimal installation (library only)")
  39. (set #usertype2-msg        '"Normal" user (library + some docs)')
  40. (set #usertype3-msg        "Assembly language programmer")
  41. (set #usertype4-msg        "'C' language programmer")
  42. (set #usertype5-msg        "Assembly & 'C' language programmer")
  43. (set #usertype6-msg        "GadUtil library author / ßeta tester")
  44.  
  45. (set #whatinstall-msg    "Which part(s) do you want to install?")
  46. (set #userpart-msg        "User installation...")
  47. (set #develpart-msg        "Developer installation...")
  48.  
  49. (set #useroptions-msg    "Select which user file(s) to install")
  50. (set #useroption1-msg    "The library file (replaces old version)")
  51. (set #useroption2-msg    "User documentation")
  52. (set #useroption3-msg    "Aminet .readme file")
  53. (set #useroption4-msg    "Snapshot pictures of some programs (GIF)")
  54.  
  55. (set #developtions-msg    "Select which development file(s) to install")
  56. (set #develoption1-msg    "Developer documentation...")
  57. (set #develoption2-msg    "Include files...")
  58. (set #develoption3-msg    "Example programs...")
  59. (set #develoption4-msg    "Catalog creation utilities...")
  60. (set #develoption5-msg    "Extra commands...")
  61. (set #develoption6-msg    "Other...")
  62.  
  63. (set #develdocs-msg        "Select which document(s) to install")
  64. (set #develdocs1-msg    "Autodocs (text format)")
  65. (set #develdocs2-msg    "Autodocs (AmigaGuide format)")
  66. (set #develdocs3-msg    "Autodocs for private functions")
  67. (set #develdocs4-msg    "Development history (English)")
  68. (set #develdocs5-msg    "Development history (Swedish)")
  69. (set #develdocs6-msg    "List with all GadTools tags")
  70. (set #convertdocs-msg    "Converting Autodocs to AmigaGuide")
  71.  
  72. (set #develinc-msg        "Select which include file(s) to install")
  73. (set #develinc1-msg        "C-language includes...")
  74. (set #develinc2-msg        "Assembly language includes...")
  75. (set #develinc3-msg        "LVOs.i (needed for Assembly examples)")
  76. (set #develinc4-msg        "FD files (Basic...)")
  77.  
  78. (set #develcinc-msg        "Create pragma files for...")
  79. (set #develcinc1-msg    "SAS-C")
  80. (set #develcinc2-msg    "DICE-C")
  81. (set #develcinc3-msg    "Aztec-C")
  82. (set #develcinc4-msg    "Maxon-C")
  83. (set #develcinc5-msg    "StormC")
  84.  
  85. (set #develasminc-msg    "Create Assembly function files for...")
  86. (set #develasminc1-msg    "Misc Assemblers (LIBINIT, LIBDEF macros)")
  87. (set #develasminc2-msg    "Aztec Asm (XDEF, EQU)")
  88.  
  89. (set #develex-msg        "Select which example(s) to install")
  90. (set #develex1-msg        "Demonstration of a bug in GadTools (Asm)")
  91. (set #develex2-msg        "Starter project for localized prog (Asm)")
  92. (set #develex3-msg        "Test program for GadTools hotkeys, loc (Asm)")
  93. (set #develex4-msg        "Bevelbox examples (Asm)")
  94. (set #develex5-msg        "Code to change internal test to external (Asm)")
  95. (set #develex6-msg        "Test program for listview functions (Asm)")
  96. (set #develexC-msg        "AmigaGuide online help example (Asm)")
  97. (set #develexF-msg        "Use of GU_FractWidth and GU_FractHeight (Asm)")
  98.  
  99. (set #develex7-msg        "The very first external test program (Asm)")
  100. (set #develex8-msg        "The first internal test program, loc (Asm)")
  101. (set #develex9-msg        "Three old test programs (Asm)")
  102. (set #develexA-msg        "Three gadgets with border around them (Asm)")
  103. (set #develexB-msg        "Test program for GadTools hotkeys, loc (C)")
  104. (set #develexD-msg        "Demo programs by other programmers (C)")
  105. (set #develexE-msg        "Demo programs by other programmers (Asm)")
  106.  
  107. (set #develcat-msg        "Select which catalog creator(s) to install")
  108. (set #develcat1-msg        "FlexCat 1.4")
  109. (set #develcat2-msg        "English documentation for FlexCat 1.4")
  110. (set #develcat3-msg        "Quick usage instructions for FlexCat 1.4")
  111. (set #develcat4-msg        "C source description file (Lattice/SAS-C)")
  112. (set #develcat5-msg        "Asm source description file (Asm-One 1.25)")
  113.  
  114. (set #develcmd-msg        "Select which extra command(s) to install")
  115. (set #develcmd1-msg        "AskEnv 2.5 (Create GUI's for DOS scripts)")
  116. (set #develcmd2-msg        "FD2Pragma (Create C pragma files from .FD)")
  117. (set #develcmd3-msg        "XIcon 2.5 (run DOS scripts from Workbench)")
  118. (set #develcmd4-msg        "SCompare & SPatch")
  119.  
  120. (set #develoth-msg        "Other thing(s) you may want to install")
  121. (set #develoth1-msg        "Debug version of library (gadutil.library_dbg)")
  122. (set #develoth2-msg        "Include file editor/installer/remover")
  123. (set #develoth3-msg        "Distribution archiver")
  124. (set #develoth4-msg        "The Installer script")
  125. (set #develoth5-msg        "The library's source code :-)")
  126. (set #develoth6-msg        "Unfinished library routines")
  127.  
  128. (set #maindir-msg  (cat    "Where do you wish to install GadUtil related\n"
  129.                         "files? The Installer will NOT create a new\n"
  130.                         "drawer at the selected location."))
  131.  
  132. (set #sellocfor-msg        "Please select a location for")
  133. (set #docdir-msg        ("%s all documentation" #sellocfor-msg))
  134. (set #cincdir-msg        ("%s 'C' include files" #sellocfor-msg))
  135. (set #asmincdir-msg        ("%s Assembly include files" #sellocfor-msg))
  136. (set #LVOSidir-msg        ("%s the LVOs.i file" #sellocfor-msg))
  137. (set #FDdir-msg            ("%s the .FD file" #sellocfor-msg))
  138. (set #exampledir-msg    ("%s example sources" #sellocfor-msg))
  139. (set #catutdir-msg        ("%s catalog utilities" #sellocfor-msg))
  140. (set #extcmddir-msg        ("%s extra commands" #sellocfor-msg))
  141.  
  142. (set #StormCDict-msg (cat "Do you want to append GadUtil function names, "
  143.                         "structure offsets and types to your StormC "
  144.                         "dictionary files (names will be appended to "
  145.                         "Amiga Functions.dic and Amiga Types.dic) ?"))
  146.  
  147. (set #debuglib-msg (cat "\nYou have selected to install another version\n"
  148.                         "of GadUtil.library, that contains some extra\n"
  149.                         "code for debugging. This version can be used\n"
  150.                         "to trace problems while starting up applications\n"
  151.                         "that uses gadutil.library.\n\n"
  152.                         "To use the 'debug' version, rename the original\n"
  153.                         "library to something else, and rename the 'debug'\n"
  154.                         "version to 'gadutil.library'. Type 'avail flush'\n"
  155.                         "in Shell to remove the normal library from memory.\n"
  156.                         "You may have to reboot to remove the library from\n"
  157.                         "memory. Start the program and read...\n"))
  158.  
  159. (set #libinst-msg        "Installing gadutil.library.")
  160. (set #debuglibinst-msg    "Installing gadutil.library (debug version).")
  161.  
  162. (set #obtainsrc-msg    (cat "\nIt seems like you're not a developer of this\n"
  163.                         "project. If you really need the source for this\n"
  164.                         "library, send both authors of the project at least\n"
  165.                         "$1.000.000 or anything equal in another currency.\n\n"
  166.                         "Don't forget to supply an empty diskette, and a SAE\n"
  167.                         "with stamps enough to cover postage expenses.\n\n"
  168.                         "Per-Olof Yliniemi            Staffan Hämälä\n"
  169.                         "Aspvägen 4E                  Vegagatan 2 3TR\n"
  170.                         "SE-957 32 Övertorneå         SE-172 34 Sundbyberg\n"
  171.                         "SWEDEN                       SWEDEN        \n"))
  172.  
  173. ;----------- Copy source file to destination w/ version check --------------
  174. ;
  175. ; Inputs:    .file1 - The file to install (source file)
  176. ;            .file2 - The destination directory
  177. ;
  178. (procedure safecopy
  179.     (set .vernum1 (getversion .file1))
  180.     (set .ver1 (/ .vernum1 65536))
  181.     (set .rev1 (- .vernum1 (* .ver1 65536)))
  182.  
  183.     (set .vernum2 (getversion (tackon .file2 (fileonly .file1))))
  184.     (set .ver2 (/ .vernum2 65536))
  185.     (set .rev2 (- .vernum2 (* .ver2 65536)))
  186.  
  187.     (if (<> .vernum1 .vernum2)
  188.     (if (> .vernum1 .vernum2)
  189.         (copyfiles
  190.             (source .file1) (dest .file2)
  191.         )
  192.  
  193.         ( (if (= @user-level 2)
  194.             (if (askbool
  195.                 (prompt (cat ("Installing %s.\n\n" (fileonly .file1))
  196.                     ("Version to install: %ld.%ld\n" .ver1 .rev1)
  197.                     ("Version currently installed: %ld.%ld\n\n" .ver2 .rev2)
  198.                      "Destination Drawer to Copy to:\n"
  199.                      .file2))
  200.                 (choices "Proceed with Copy" "Skip This Part")
  201.                 (default 0)
  202.                 (help    (cat "The Installer has detected that a later version\n"
  203.                     "of the file that is going to be copied already\n"
  204.                     "exists at the selected destination.\n\n"
  205.                     "Select \"Proceed with Copy\" to replace the newer\n"
  206.                     "file with an older one. Select \"Skip This Part\"\n"
  207.                     "to keep the installed version.\n"))
  208.                 )
  209.                 (copyfiles
  210.                     (source .file1) (dest .file2)
  211.                 )
  212.             )
  213.         ))
  214.     ))
  215. )
  216.  
  217. ;-------------------- Installation script begins here ----------------------
  218. (if (exists "env:sys/def_doc.info")
  219.     (set def_doc_icon "env:sys/def_doc.info")
  220.     (set def_doc_icon "icons/def_doc.info")
  221. )
  222.  
  223. (if (exists "env:sys/def_guide.info")
  224.     (set def_guide_icon "env:sys/def_guide.info")
  225.     (set def_guide_icon "icons/def_doc.info")
  226. )
  227.  
  228. (set olduserlevel @user-level)
  229. (user 2)
  230. (transcript #install-msg)
  231. (message #info-msg)
  232. (message #usertype-msg)
  233.  
  234. ;--------------------------------- Get user type ---------------------------
  235. (if (= olduserlevel 0)
  236.     (set usertype
  237.         (askchoice
  238.             (prompt #selusertype-msg)
  239.             (help @askchoice-help)
  240.             (choices    #usertype1-msg
  241.                         #usertype2-msg
  242.             )
  243.         )
  244.     )
  245.  
  246.     (set usertype
  247.         (askchoice
  248.             (prompt #selusertype-msg)
  249.             (help @askchoice-help)
  250.             (choices    #usertype1-msg
  251.                         #usertype2-msg
  252.                         #usertype3-msg
  253.                         #usertype4-msg
  254.                         #usertype5-msg
  255.                         #usertype6-msg
  256.             )
  257.         )
  258.     )
  259. )
  260. ;------------------ Set default settings for user-types --------------------
  261.  
  262. (set def_installtype (select usertype  %01  %01  %11  %11  %11  %11))
  263. (set def_userinstall (select usertype %0001 %1111 %1111 %1111 %1111 %1111))
  264. (set def_develinstall (select usertype  %000000 %000000 %111111
  265.                                         %111111 %111111 %111111))
  266. (set def_develdocs (select usertype %000000 %000000 %001010
  267.                                     %001010 %001010 %111111))
  268. (set def_develinc (select usertype %0000 %0000 %0110 %1001 %1111 %1111))
  269. (set def_develex1 (select usertype    %00000000 %00000000 %11101110
  270.                                     %00000000 %11101110 %11111111))
  271. (set def_develex2 (select usertype %0000000 %0000000 %1001000
  272.                                     %0110000 %1111000 %1111111))
  273.  
  274. (set def_develcat (select usertype %00000 %00000 %10111 %01111 %11111 %11111))
  275. (set def_develcmd (select usertype %0000 %0000 %1001 %1011 %1011 %1111))
  276. (set def_develoth (select usertype    %000000 %000000 %000011
  277.                                     %000011 %000011 %001111))
  278.  
  279. (user olduserlevel)
  280. ;--------------------------- Check type of installation --------------------
  281. (set installtype
  282.     (askoptions
  283.         (prompt #whatinstall-msg)
  284.         (help    @askoptions-help)
  285.         (choices    #userpart-msg
  286.                     #develpart-msg
  287.         )
  288.         (default def_installtype)
  289. ;        (default (- 2 (> thisvernum vernum)))
  290.     )
  291. )
  292.  
  293. (if (= installtype 0)
  294.     (message "So, you didn't want to install GadUtil yet...\nLater maybe???")
  295. )
  296.  
  297. ;-------------------------- Get options for user install -------------------
  298. (if (IN installtype 0)
  299.     (set userinstall
  300.         (askoptions
  301.             (prompt #useroptions-msg)
  302.             (help    @askoptions-help)
  303.             (choices    #useroption1-msg
  304.                         #useroption2-msg
  305.                         #useroption3-msg
  306.                         #useroption4-msg
  307.             )
  308.             (default def_userinstall)
  309.         )
  310.     )
  311. )
  312.  
  313. ;---------------------- Get options for developer install ------------------
  314. (if (IN installtype 1)
  315.     (set develinstall
  316.         (askoptions
  317.             (prompt #developtions-msg)
  318.             (help    @askoptions-help)
  319.             (choices    #develoption1-msg
  320.                         #develoption2-msg
  321.                         #develoption3-msg
  322.                         #develoption4-msg
  323.                         #develoption5-msg
  324.                         #develoption6-msg
  325.             )
  326.             (default def_develinstall)
  327.         )
  328.     )
  329. )
  330.  
  331. ;-------------------- Check which devel docs to install --------------------
  332. (if (IN develinstall 0)
  333.     (set develdocs
  334.         (askoptions
  335.             (prompt #develdocs-msg)
  336.             (help    @askoptions-help)
  337.             (choices    #develdocs1-msg
  338.                         #develdocs2-msg
  339.                         #develdocs3-msg
  340.                         #develdocs4-msg
  341.                         #develdocs5-msg
  342.                         #develdocs6-msg
  343.             )
  344.             (default def_develdocs)
  345.         )
  346.     )
  347. )
  348.  
  349. ;--------------------- Check which includes to install ---------------------
  350. (if (IN develinstall 1)
  351.     (set develinc
  352.         (askoptions
  353.             (prompt #develinc-msg)
  354.             (help    @askoptions-help)
  355.             (choices    #develinc1-msg
  356.                         #develinc2-msg
  357.                         #develinc3-msg
  358.                         #develinc4-msg
  359.             )
  360.             (default def_develinc)
  361.         )
  362.     )
  363. )
  364.  
  365. ;-------------------- Check which C includes to create ---------------------
  366. (if (IN develinc 0)
  367.     (set cinc
  368.         (askchoice
  369.             (prompt #develcinc-msg)
  370.             (help    @askchoice-help)
  371.             (choices    #develcinc1-msg
  372.                         #develcinc2-msg
  373.                         #develcinc3-msg
  374.                         #develcinc4-msg
  375.                         #develcinc5-msg
  376.             )
  377.         )
  378.     )
  379. )
  380.  
  381. ;------------------- Check which Asm includes to create --------------------
  382. (if (IN develinc 1)
  383.     (set asminc
  384.         (askchoice
  385.             (prompt #develasminc-msg)
  386.             (help    @askchoice-help)
  387.             (choices    #develasminc1-msg
  388.                         #develasminc2-msg
  389.             )
  390.         )
  391.     )
  392. )
  393.  
  394. ;-------------------- Check which examples to install ----------------------
  395. (if (IN develinstall 2)(
  396.     (set develex1
  397.         (askoptions
  398.             (prompt #develex-msg)
  399.             (help    @askoptions-help)
  400.             (choices    #develex1-msg
  401.                         #develex2-msg
  402.                         #develex3-msg
  403.                         #develex4-msg
  404.                         #develex5-msg
  405.                         #develex6-msg
  406.                         #develexC-msg
  407.                         #develexF-msg
  408.             )
  409.             (default def_develex1)
  410.         )
  411.     )
  412.  
  413.     (set develex2
  414.         (askoptions
  415.             (prompt #develex-msg)
  416.             (help    @askoptions-help)
  417.             (choices    #develex7-msg
  418.                         #develex8-msg
  419.                         #develex9-msg
  420.                         #develexA-msg
  421.                         #develexB-msg
  422.                         #develexD-msg
  423.                         #develexE-msg
  424.             )
  425.             (default def_develex2)
  426.         )
  427.     )
  428. ))
  429.  
  430. ;---------------- Check which catalog utilities to install -----------------
  431. (if (IN develinstall 3)
  432.     (set develcat
  433.         (askoptions
  434.             (prompt #develcat-msg)
  435.             (help    @askoptions-help)
  436.             (choices    #develcat1-msg
  437.                         #develcat2-msg
  438.                         #develcat3-msg
  439.                         #develcat4-msg
  440.                         #develcat5-msg
  441.             )
  442.             (default def_develcat)
  443.         )
  444.     )
  445. )
  446.  
  447. ;------------------ Check which extra commands to install ------------------
  448. (if (IN develinstall 4)
  449.     (set develcmd
  450.         (askoptions
  451.             (prompt #develcmd-msg)
  452.             (help    @askoptions-help)
  453.             (choices    #develcmd1-msg
  454.                         #develcmd2-msg
  455.                         #develcmd3-msg
  456.                         #develcmd4-msg
  457.             )
  458.             (default def_develcmd)
  459.         )
  460.     )
  461. )
  462.  
  463. ;------------------- Check which other files to install --------------------
  464. (if (IN develinstall 5)
  465.     (set develoth
  466.         (askoptions
  467.             (prompt #develoth-msg)
  468.             (help    @askoptions-help)
  469.             (choices    #develoth1-msg
  470.                         #develoth2-msg
  471.                         #develoth3-msg
  472.                         #develoth4-msg
  473.                         #develoth5-msg
  474.                         #develoth6-msg
  475.             )
  476.             (default def_develoth)
  477.         )
  478.     )
  479. )
  480.  
  481. ;-------------------------- Create main directory --------------------------
  482. (if (OR
  483.         (AND (IN installtype 0) (IN userinstall 1 2 3))
  484.         (AND (IN installtype 1) (OR    (<> develdocs 0)
  485.                                     (OR (<> develex1 0) (<> develex2 0))
  486.                                     (<> develcat 0)
  487.                                     (> develoth 1)
  488.                                 )
  489.         )
  490.     )
  491.  
  492.     (
  493.         (set destdir
  494.             (askdir
  495.                 (prompt #maindir-msg)
  496.                 (help @askdir-help)
  497.                 (default @default-dest)
  498.             )
  499.         )
  500.         (if (= @user-level 0) (set destdir (tackon destdir "GadUtil")))
  501.  
  502.         (if (<> (substr destdir (- (strlen destdir) 1)) ":")
  503.             (makedir destdir (infos))
  504.         )
  505.  
  506.         (set @default-dest destdir)
  507.     )
  508. )
  509.  
  510. ;-------------------------- Create docs directory --------------------------
  511. (if (AND (<> installtype 0) (OR (> userinstall 1)(<> develdocs 0)))
  512.     (
  513.         (set docdir
  514.             (askdir
  515.                 (prompt #docdir-msg)
  516.                 (help @askdir-help)
  517.                 (newpath)
  518.                 (default (tackon destdir "Docs"))
  519.             )
  520.         )
  521.         (makedir docdir (infos))
  522.     )
  523. )
  524.  
  525. ;-------------------------- Do user installation ---------------------------
  526. (if (IN userinstall 0)
  527.        (copylib
  528.         (prompt #libinst-msg)
  529.            (help @copylib-help)
  530.            (source "libs/gadutil.library")
  531.            (dest "libs:")
  532.            (confirm)
  533.     )
  534. )
  535.  
  536. (if (IN userinstall 1)
  537.     (
  538.         (copyfiles (source "docs/GadUtil.Manual")
  539.             (dest docdir)
  540.         )
  541.         (copyfiles (source def_guide_icon)
  542.             (dest docdir) (newname "GadUtil.Manual.info")
  543.         )
  544.     )
  545. )
  546.  
  547. (if (IN userinstall 2)
  548.     (
  549.         (copyfiles (source "docs/GadUtil_dev.readme")
  550.             (dest docdir)
  551.         )
  552.         (copyfiles (source def_doc_icon)
  553.             (dest docdir) (newname "GadUtil_dev.readme.info")
  554.         )
  555.  
  556.         (copyfiles (source "docs/GadUtil_usr.readme")
  557.             (dest docdir)
  558.         )
  559.         (copyfiles (source def_doc_icon)
  560.             (dest docdir) (newname "GadUtil_usr.readme.info")
  561.         )
  562.  
  563.         (copyfiles (source "docs/GadUtil_html.readme")
  564.             (dest docdir)
  565.         )
  566.         (copyfiles (source def_doc_icon)
  567.             (dest docdir) (newname "GadUtil_html.readme.info")
  568.         )
  569.     )
  570. )
  571.  
  572. (if (IN userinstall 3)
  573.     (copyfiles
  574.         (source "docs/pics")
  575.         (dest (tackon docdir "Pics"))
  576.         (all) (infos)
  577.     )
  578. )
  579.     
  580. ;----------------- Install selected developer documents --------------------
  581. (if (IN develdocs 0)
  582.     (
  583.         (copyfiles (source "Docs/GadUtil.doc") (dest docdir) )
  584.         (copyfiles (source def_doc_icon) (dest docdir)
  585.             (newname "GadUtil.doc.info")
  586.         )
  587.     )
  588. )
  589.  
  590. (if (IN develdocs 1)
  591.     (
  592.         (message #convertdocs-msg)
  593.         (run (cat "ExtraCmds/spatch -o" (tackon docdir "GadUtil.guide")
  594.                             " -pDocs/GadUtil_doc_to_guide.pch Docs/GadUtil.doc")
  595.         )
  596.         (copyfiles (source def_guide_icon) (dest docdir)
  597.             (newname "GadUtil.guide.info")
  598.         )
  599.  
  600.         (copyfiles (source "Docs/GadUtil.index") (dest docdir) )
  601.         (copyfiles (source def_guide_icon) (dest docdir)
  602.             (newname "GadUtil.index.info")
  603.         )
  604.     )
  605. )
  606.  
  607. (if (IN develdocs 2)
  608.     (
  609.         (copyfiles (source "Docs/PrivateFunctions") (dest docdir) )
  610.         (copyfiles (source def_doc_icon) (dest docdir)
  611.             (newname "PrivateFunctions.info")
  612.         )
  613.     )
  614. )
  615.  
  616. (if (IN develdocs 3)
  617.     (
  618.         (copyfiles (source "Docs/dev_history.guide") (dest docdir) )
  619.         (copyfiles (source def_guide_icon) (dest docdir)
  620.             (newname "dev_history.guide.info")
  621.         )
  622.     )
  623. )
  624.  
  625. (if (IN develdocs 4)
  626.     (
  627.         (copyfiles (source "Docs/dev_historia.guide") (dest docdir) )
  628.         (copyfiles (source def_guide_icon) (dest docdir)
  629.             (newname "dev_historia.guide.info")
  630.         )
  631.     )
  632. )
  633.  
  634. (if (IN develdocs 5)
  635.     (
  636.         (copyfiles (source "Docs/gadtools.tags") (dest docdir) )
  637.         (copyfiles (source def_doc_icon) (dest docdir)
  638.             (newname "gadtools.tags.info")
  639.         )
  640.     )
  641. )
  642.  
  643. ;-------------------- Install all selected include files -------------------
  644. (if (AND (> installtype 1) (<> develinc 0))
  645.     (    (    (    (
  646.         (if (IN develinc 0)
  647.             ((set cincdir
  648.                 (askdir
  649.                     (prompt #cincdir-msg)
  650.                     (help @askdir-help)
  651.                     (newpath)
  652.                     (default "include:")
  653.                 )
  654.             )
  655.  
  656.             (set ccomp (select cinc "SAS" "DICE" "Aztec" "Maxon" "Maxon"))
  657.  
  658.             (if (= ccomp "SAS")
  659.                 (set .file1 "include/clib/gadutil_protos_SAS.h")
  660.                 (set .file1 "include/clib/gadutil_protos.h")
  661.             )
  662.  
  663.             ((set .file2 (tackon cincdir "clib"))
  664.             (safecopy))
  665.  
  666.             (if (= ccomp "SAS")
  667.                 (rename (tackon cincdir "clib/gadutil_protos_SAS.h")
  668.                                 (tackon cincdir "clib/gadutil_protos.h"))
  669.             )
  670.  
  671.             ((set .file1 "include/libraries/gadutil.h")
  672.             (set .file2    (tackon cincdir "libraries"))
  673.             (safecopy))
  674.  
  675.  
  676.             ((set .file1 "include/gadutil_20to30comp.h")
  677.             (set .file2 cincdir)
  678.             (safecopy))
  679.  
  680.             (copyfiles
  681.                 (source "include/proto/gadutil.h")
  682.                 (dest (tackon cincdir "proto"))
  683.             )
  684.  
  685.             (if (= ccomp "Aztec")
  686.                 (set pragmaname "pragmas/gadutil_lib.h")
  687.                 (set pragmaname "pragmas/gadutil_pragmas.h")
  688.             )
  689.  
  690.             (makedir (tackon cincdir "pragmas"))
  691.  
  692.             (run (cat "ExtraCmds/fd2pragma include/FD/gadutil_lib.fd "
  693.                             ccomp ' "' (tackon cincdir pragmaname) '"'))
  694.  
  695.             (if (<> "" (getassign "StormC" "adv"))
  696.                 (
  697.                     (set StormCDict
  698.                         (askbool
  699.                             (prompt #StormCDict-msg)
  700.                             (help @askbool-help)
  701.                             (choices "Yes" "No, I'll do it later")
  702.                             (default 1)
  703.                         )
  704.                     )
  705.  
  706.                     (if (= StormCDict 1)
  707.                         (
  708.                             (run "c:edit \"StormC:StormSys/Dictionary/Amiga Functions.dic\" WITH icons/EditorCommands1")
  709.                             (textfile (dest "StormC:StormSYS/Dictionary/Amiga Functions.dic")
  710.                                       (include "StormC:StormSYS/Dictionary/Amiga Functions.dic")
  711.                                       (include "include/StormC/GadUtil Functions.dic"))
  712.  
  713.                             (run "c:edit \"StormC:StormSys/Dictionary/Amiga Types.dic\" WITH icons/EditorCommands2")
  714.                             (textfile (dest "StormC:StormSYS/Dictionary/Amiga Types.dic")
  715.                                       (include "StormC:StormSYS/Dictionary/Amiga Types.dic")
  716.                                       (include "include/StormC/GadUtil Types.dic"))
  717.                         )
  718.                     )
  719.                 )
  720.             )
  721.         ))
  722.  
  723.         (if (IN develinc 1)
  724.             (    (if (<> cincdir 0)
  725.                     (set defasminc cincdir)
  726.                     (set defasminc "include:")
  727.                 )
  728.                 (set asmincdir
  729.                     (askdir
  730.                         (prompt #asmincdir-msg)
  731.                         (help @askdir-help)
  732.                         (newpath)
  733.                         (default defasminc)
  734.                     )
  735.                 )
  736.  
  737.                 ((set .file1 "include/libraries/gadutil.i") 
  738.                 (set .file2 (tackon asmincdir "libraries"))
  739.                 (safecopy))
  740.  
  741.                 ((set .file1 "include/gadutil_20to30comp.i")
  742.                 (set .file2 asmincdir)
  743.                 (safecopy))
  744.  
  745.                 (if (= asminc 0)
  746.                     ((set .file1 "include/libraries/gadutil_lib.i")
  747.                     (set .file2 (tackon asmincdir "libraries"))
  748.                     (safecopy))
  749.                     (
  750.                         (run (cat "ExtraCmds/fd2pragma include/FD/gadutil_lib.fd "
  751.                             'AS "' (tackon asmincdir "libraries/gadutil_lib.asm") '"'))
  752.                     )
  753.                 )
  754.  
  755.             )
  756.         ))
  757.  
  758.         (if (IN develinc 2)
  759.             (    (if (<> asmincdir 0)
  760.                     (set deflvodir asmincdir)
  761.                     (set deflvodir "include:")
  762.                 )
  763.                 (set LVOSidir
  764.                     (askdir
  765.                         (prompt #LVOSidir-msg)
  766.                         (help @askdir-help)
  767.                         (newpath)
  768.                         (default deflvodir)
  769.                     )
  770.                 )
  771.  
  772.                 ((set .file1 "include/LVOs.i")
  773.                 (set .file2 LVOSidir)
  774.                 (safecopy))
  775.             )
  776.         ))
  777.  
  778.         (if (IN develinc 3)
  779.             (    (set FDdir
  780.                     (askdir
  781.                         (prompt #FDdir-msg)
  782.                         (help @askdir-help)
  783.                         (newpath)
  784.                         (default "FD:")
  785.                     )
  786.                 )
  787.                 ((set .file1 "include/FD/gadutil_lib.fd")
  788.                 (set .file2 FDdir)
  789.                 (safecopy))
  790.             )
  791.         ))
  792.     )
  793. )
  794.  
  795. ;----------------------- Create directory for examples ---------------------
  796. (if (OR (<> develex1 0) (<> develex2 0))
  797.     (
  798.         (set exampledir
  799.             (askdir
  800.                 (prompt #exampledir-msg)
  801.                 (help @askdir-help)
  802.                 (newpath)
  803.                 (default (tackon destdir "Examples"))
  804.             )
  805.         )
  806.         (makedir exampledir (infos))
  807.     )
  808. )
  809.  
  810. ;------------------------- Install selected examples -----------------------
  811. (if (IN develex1 0)
  812.     (    (copyfiles
  813.             (source "Examples/GadToolsBug.s")
  814.             (dest exampledir)
  815.         )
  816.         (copyfiles
  817.             (source "Examples/GadToolsBug1")
  818.             (dest exampledir)
  819.         )
  820.         (copyfiles
  821.             (source "Examples/GadToolsBug2")
  822.             (dest exampledir)
  823.     )    )
  824. )
  825.  
  826. (if (IN develex1 1)
  827.     (copyfiles
  828.         (source "Examples/AnyProgram")
  829.         (dest (tackon exampledir "AnyProgram"))
  830.         (all)(infos)
  831.     )
  832. )
  833.  
  834. (if (IN develex1 2)
  835.     (copyfiles
  836.         (source "Examples/BetterTest")
  837.         (dest (tackon exampledir "BetterTest"))
  838.         (all) (infos)
  839.     )
  840. )
  841.  
  842. (if (IN develex1 3)
  843.     (    (copyfiles
  844.             (source "Examples/BevelTest.s")
  845.             (dest exampledir)
  846.         )
  847.         (copyfiles
  848.             (source "Examples/BevelTest")
  849.             (dest exampledir)
  850.     )    )
  851. )
  852.  
  853. (if (IN develex1 4)
  854.     (copyfiles
  855.         (source "Examples/ExternTestInit.s")
  856.         (dest exampledir)
  857.     )
  858. )
  859.  
  860. (if (IN develex1 5)
  861.     (    (copyfiles
  862.             (source "Examples/LVTest.s")
  863.             (dest exampledir)
  864.         )
  865.  
  866.         (copyfiles
  867.             (source "Examples/LVTest")
  868.             (dest exampledir)
  869.     )    )
  870. )
  871.  
  872. (if (IN develex1 6)
  873.     (    (copyfiles
  874.             (source "Examples/AGuideTest.s")
  875.             (dest exampledir)
  876.         )
  877.         (copyfiles
  878.             (source "Examples/AGuideTest")
  879.             (dest exampledir)
  880.     )    )
  881. )
  882.  
  883. (if (IN develex1 7)
  884.     (    (copyfiles
  885.             (source "Examples/FractWidHei.s")
  886.             (dest exampledir)
  887.         )
  888.         (copyfiles
  889.             (source "Examples/FractWidHei")
  890.             (dest exampledir)
  891.     )    )
  892. )
  893.  
  894. (if (IN develex2 0)
  895.     (    (copyfiles
  896.             (source "Examples/mytestprog.s")
  897.             (dest exampledir)
  898.         )
  899.         (copyfiles
  900.             (source "Examples/mytestprog1")
  901.             (dest exampledir)
  902.         )
  903.         (copyfiles
  904.             (source "Examples/mytestprog2")
  905.             (dest exampledir)
  906.     )    )
  907. )
  908.  
  909. (if (IN develex2 1)
  910.     (copyfiles
  911.         (source "Examples/OldInternal")
  912.         (dest (tackon exampledir "OldInternal"))
  913.         (all)(infos)
  914.     )
  915. )
  916.  
  917. (if (IN develex2 2)
  918.     (copyfiles
  919.         (source "Examples/OldTestProgs")
  920.         (dest (tackon exampledir "OldTestProgs"))
  921.         (all) (infos)
  922.     )
  923. )
  924.  
  925. (if (IN develex2 3)
  926.     (    (copyfiles
  927.             (source "Examples/ThreeGadgets.s")
  928.             (dest exampledir)
  929.         )
  930.         (copyfiles
  931.             (source "Examples/ThreeGadgets")
  932.             (dest exampledir)
  933.     )    )
  934. )
  935.  
  936. (if (IN develex2 4)
  937.     (copyfiles
  938.         (source "Examples/BetterTest-C")
  939.         (dest (tackon exampledir "BetterTest-C"))
  940.         (all) (infos)
  941.     )
  942. )
  943.  
  944. (if (IN develex2 5)
  945.     (copyfiles
  946.         (source "Examples/MoreExamples-C")
  947.         (dest (tackon exampledir "MoreExamples-C"))
  948.         (all) (infos)
  949.     )
  950. )
  951.  
  952. (if (IN develex2 6)
  953.     (copyfiles
  954.         (source "Examples/MoreExamples")
  955.         (dest (tackon exampledir "MoreExamples"))
  956.         (all) (infos)
  957.     )
  958. )
  959.  
  960. ;----------------- Create directory for catalog utilities ------------------
  961. (if (<> develcat 0)
  962.     (
  963.         (set catutdir
  964.             (askdir
  965.                 (prompt #catutdir-msg)
  966.                 (help @askdir-help)
  967.                 (newpath)
  968.                 (default (tackon destdir "CatalogUtils"))
  969.             )
  970.         )
  971.         (makedir catutdir (infos))
  972.     )
  973. )
  974.  
  975. ;-------------------- Install selected catalog utilities -------------------
  976. (if (IN develcat 0)
  977.     (copyfiles
  978.         (source "CatalogUtils/FlexCat")
  979.         (dest catutdir)
  980.     )
  981. )
  982.  
  983. (if (IN develcat 1)
  984.     (    (copyfiles
  985.             (source "CatalogUtils/FlexCat_Eng.guide")
  986.             (dest catutdir)
  987.         )
  988.         (copyfiles
  989.             (source def_guide_icon)
  990.             (dest catutdir) (newname "FlexCat_Eng.guide.info")
  991.     )    )
  992. )
  993.  
  994. (if (IN develcat 2)
  995.     (    (copyfiles
  996.             (source "CatalogUtils/FlexCat_Quick.doc")
  997.             (dest catutdir)
  998.         )
  999.         (copyfiles
  1000.             (source def_doc_icon)
  1001.             (dest catutdir) (newname "FlexCat_Quick.doc.info")
  1002.     )    )
  1003. )
  1004.  
  1005. (if (IN develcat 3)
  1006.     (copyfiles
  1007.         (source "CatalogUtils/Lattice_Data.sd")
  1008.         (dest catutdir)
  1009.     )
  1010. )
  1011.  
  1012. (if (IN develcat 4)
  1013.     (copyfiles
  1014.         (source "CatalogUtils/ASM-One_Data.sd")
  1015.         (dest catutdir)
  1016.     )
  1017. )
  1018.  
  1019. ;------------------ Create directory for extra commands --------------------
  1020. (if (<> develcmd 0)
  1021.     (
  1022.         (set extcmddir
  1023.             (askdir
  1024.                 (prompt #extcmddir-msg)
  1025.                 (help @askdir-help)
  1026.                 (newpath)
  1027.                 (default "C:")
  1028.             )
  1029.         )
  1030.         (if (<> (exists extcmddir) 2)
  1031.             (makedir extcmddir (infos))
  1032.         )
  1033.     )
  1034. )
  1035.  
  1036. ;---------------------- Install selected extra commands --------------------
  1037. (if (IN develcmd 0)
  1038.     (copyfiles
  1039.         (source "ExtraCmds/AskEnv")
  1040.         (dest extcmddir)
  1041.     )
  1042. )
  1043.  
  1044. (if (IN develcmd 1)
  1045.     (    (copyfiles
  1046.             (source "ExtraCmds/FD2Pragma")
  1047.             (dest extcmddir)
  1048.         )
  1049.         (copyfiles
  1050.             (prompt #sellocfor-msg)
  1051.             (source "ExtraCmds/FD2Pragma.readme")
  1052.             (dest extcmddir)
  1053.             (confirm) (help @copyfiles-help)
  1054.         )
  1055.     )
  1056. )
  1057.  
  1058. (if (IN develcmd 2)
  1059.     (copyfiles
  1060.         (source "ExtraCmds/XIcon")
  1061.         (dest extcmddir)
  1062.     )
  1063. )
  1064.  
  1065. (if (IN develcmd 3)
  1066.     (    (copyfiles
  1067.             (source "ExtraCmds/spatch")
  1068.             (dest extcmddir)
  1069.         )
  1070.         (copyfiles
  1071.             (source "ExtraCmds/scompare")
  1072.             (dest extcmddir)
  1073.         )
  1074.     )
  1075. )
  1076.  
  1077. ;--------------------- Install debug version of library --------------------
  1078. (if (IN develoth 0)
  1079.     (
  1080.         (message #debuglib-msg)
  1081.         (copylib
  1082.             (prompt #debuglibinst-msg)
  1083.             (help @copylib-help)
  1084.             (source "libs/gadutil.library_dbg")
  1085.             (dest "libs:")
  1086.             (confirm)
  1087.         )
  1088.     )
  1089. )
  1090.  
  1091. (if (IN develoth 1)
  1092.     (    (copyfiles
  1093.             (source "InstallInc.info")
  1094.             (dest destdir)
  1095.         )
  1096.         (copyfiles
  1097.             (source "install.script")
  1098.             (dest destdir)
  1099.         )
  1100.         (copyfiles
  1101.             (source "InstallInc.gad")
  1102.             (dest destdir)
  1103.         )
  1104.     )
  1105. )
  1106.  
  1107. (if (IN develoth 2)
  1108.     (    (copyfiles
  1109.             (source "-MakeArchive-.info")
  1110.             (dest destdir)
  1111.         )
  1112.         (copyfiles
  1113.             (source "-MakeDevel-.info")
  1114.             (dest destdir)
  1115.         )
  1116.         (copyfiles
  1117.             (source "-MakeUser-.info")
  1118.             (dest destdir)
  1119.     )    )
  1120. )
  1121.  
  1122. (if (IN develoth 3)
  1123.     (    (copyfiles
  1124.             (source "Install") (infos)
  1125.             (dest destdir)
  1126.         )
  1127.         (copyfiles
  1128.             (source "Install_User") (infos)
  1129.             (dest destdir)
  1130.         )
  1131.         (copyfiles
  1132.             (source "icons")
  1133.             (dest (tackon destdir "icons"))
  1134.             (all)
  1135.         )
  1136.         (copyfiles
  1137.             (source "libs")
  1138.             (dest (tackon destdir "libs"))
  1139.             (all)(infos)
  1140.     )    )
  1141. )
  1142.  
  1143. (if (IN develoth 4)
  1144.     (    (if (exists "GadUtilLib.s")
  1145.             ((set .file1 "GadUtilLib.s")
  1146.             (set .file2 destdir)
  1147.             (safecopy))
  1148.             (message #obtainsrc-msg)
  1149.         )
  1150.     )
  1151. )
  1152.  
  1153. (if (IN develoth 5)
  1154.     (
  1155.         (if (exists "GU_DrawBevelBoxA.s")
  1156.             (copyfiles
  1157.                 (source "GU_DrawBevelBoxA.s")
  1158.                 (dest destdir)
  1159.             )
  1160.             (message #obtainsrc-msg)
  1161.         )
  1162.     )
  1163. )
  1164.  
  1165. ;--------------------------------- Done ------------------------------------
  1166. (exit)
  1167.